﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="House客户端.WebForm1" %>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="copyright" content="All Rights Reserved, Copyright (C) 2013, Wuyeguo, Ltd." />
    <title>首页</title>
    <link href="easyui/easyui/1.3.4/themes/default/easyui.css" rel="stylesheet" />
    <link href="easyui/css/wu.css" rel="stylesheet" />
    <link href="easyui/css/icon.css" rel="stylesheet" />
</head>
<body class="easyui-layout">
    <!-- begin of header -->
    <div class="wu-header" data-options="region:'north',border:false,split:true">
        <div class="wu-header-left">
            <h1>地产评估系统</h1>
        </div>
        <div class="wu-header-right">
            <p>
                <asp:Label ID="Label1" runat="server" Text="Label"><%=Request["name"] %></asp:Label>
                ，欢迎您！
            
            </p>
            <p><a href="#">网站首页</a>|<a href="#">支持论坛</a>|<a href="#">帮助中心</a>|<a href="login.aspx">安全退出</a></p>
        </div>
    </div>
    <div class="wu-sidebar" data-options="region:'west',split:true,border:true,title:'导航菜单'">
        <div class="easyui-accordion" data-options="border:false,fit:true">
            <div title="快捷菜单" data-options="iconCls:'icon-application-cascade'" style="padding: 5px;">
                <ul class="easyui-tree wu-side-tree" id="menu">
                </ul>
            </div>
        </div>
    </div>
    <div class="wu-main" data-options="region:'center'">
        <div id="wu-tabs" class="easyui-tabs" data-options="border:false,fit:true">
            <div title="首页" data-options="href:'Show.aspx',closable:false,iconCls:'icon-tip',cls:'pd3'"></div>
        </div>
    </div>
    <div class="wu-footer" data-options="region:'south',border:true,split:true">
        &copy; 2017 Wu All Rights Reserved
    </div>
    <script src="easyui/js/jquery-1.8.0.min.js"></script>
    <script src="easyui/easyui/1.3.4/jquery.easyui.min.js"></script>
    <script src="easyui/easyui/1.3.4/locale/easyui-lang-zh_CN.js"></script>
    <script src="easyui/jquery.params.js"></script>
    <script src="jquery-easyui-1.5.2/Common.js"></script>
    <script type="text/javascript">
        //点击树节点  转到相应界面
        $(function () {
            $("#menu").tree({
                onClick: function (node) {
                    if (node.attributes !== undefined && node.attributes.url !== "") {
                        addTab(node.text, node.attributes.url);
                    }
                }
            });
        });
        //接受登陆传角色id值
        var roleid = $.query.get("roleid");
        //绑定左侧树
        $(function () {
            $.ajax({
                type: "Get",
                url: WebApiURL + "api/Authority/?roleid=" + roleid,
                success: function (result) {
                    var data = eval('(' + result + ')');
                    $("#menu").tree({
                        data: data,
                        lines: true
                    })
                }
            })
        })
        // Name 选项卡初始化
        $('#wu-tabs').tabs({
            tools: [{
                iconCls: 'icon-reload',
                border: false,
                handler: function () {
                    $('#wu-datagrid').datagrid('reload');
                }
            }]
        });
        // 添加Tab标签
        function addTab(title, url) {
            if ($("#wu-tabs").tabs('exists', title)) {
                $("#wu-tabs").tabs('select', title);
            } else {
                var conten = '<iframe scrolling="auto" frameborder="0" style="width:100%;height:100%;" src="' + url + '"></iframe>';
                $("#wu-tabs").tabs('add', {
                    title: title,
                    content: conten,
                    closable: true
                });
            }
        }
        function removeTab() {
            var tabPanel = $('#wu-tabs');
            var tab = tabPanel.tabs('getSelected');
            if (tab) {
                var index = tabPanel.tabs('getTabIndex', tab);
                tabPanel.tabs('close', index);
            }
        }
    </script>
</body>
</html>
